{extend name="public/common"} {block name="body"}
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i>
   
    玩家管理
    <span class="c-gray en">&gt;</span>
    试玩账号
    <a class="btn btn-success radius r"
      style="line-height: 1.6em; margin-top: 3px"
      href="javascript:location.replace(location.href);" title="刷新">
      <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>

<div style="padding:20px;height:30px;">
  	
  	<div class="new_box">
<div class="cl pd-5 bg-1 bk-gray mt-20"> 
  <span class="l" style="margin-left:15px;">
  	<a style="height: 40px;line-height: 30px;" href="javascript:;"onclick="if(confirm('是否确认操作？')) {window.location.href='/admin/member/swus_qingli'}" class="btn btn-danger radius">一键删除全部试玩账号 </a>
  </span>
</div>
<form action="{:url('member/swus_list')}" enctype="application/x-www-form-urlencoded" method="post" style="margin-left:20px;float:left;margin: 20px 20px;">
  
    <input type="text" name="username" id="username" placeholder="用户名/姓名" style="width:150px" class="input-text" value="{$username}">
     <button class="btn btn-success" type="submit" style="margin-right:20px;"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
</form>
<div class="page-container dataTables_wrapper">
  <div id="tab-system" class="HuiTab">
    <div class="tabCon">
      <div class="mt-20">
        <table
          class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
          <thead>
            <tr class="text-c">
              <th>ID</th>
              <th>用户名</th>
              <th>试玩IP</th>
              <th>客户端</th>
              <th>试玩时间</th>
            </tr>
           {volist name="listarea" id="v"}
          </thead>
          <tbody>
          
            <tr class="text-c">
              <td>{$v.id}</td>
              <td>{$v.username}</td>
              <td>{$v.reg_ip}</td>
              <td>
     
                {$v.khd==1?'电脑端':($v.khd==2 ? '手机端' :'APP')}
              </td>
              <td>
     
               <?php echo date("Y-m-d H:i:s",$v['reg_time'] ) ?>
              </td>
             
               
                 {/volist}
            </tr>
          
          </tbody>
        </table>
      </div>
    </div>
    <div class="dataTables_paginate paging_simple_numbers" style="width:100%;">
        <div style="float:left;">  
          每页显示<select name="limit" style="height:26px;" id="code">
              <option value="20" {if condition="$limit eq 20"}selected{/if}>
                20
              </option>
              <option value="50" {if condition="$limit eq 50"}selected{/if}>
                50
              </option>
              <option value="100" {if condition="$limit eq 100"}selected{/if}>
                100
              </option>
              
           </select>页
          </div>
          <span style="float:right;margin-left:-2px;">总共{$listarea->lastPage()}页  当前第{$listarea->currentPage()}页 ，共{$listarea->total()}条</span>
          <div style="float:left;">{$listarea->render()}</div>
    </div>
  </div>
</div>

</div>

  </div>
{/block}

{block name="js"} 

<script type="text/javascript">
    $(function() {
  $('.skin-minimal input').iCheck({
    checkboxClass : 'icheckbox-blue',
    radioClass : 'iradio-blue',
    increaseArea : '20%'
  });
  $("#tab-system").Huitab({
    index : 0
  });
});

</script>
<script>
$(function(){
var username=$("#username").val();
var id=$("#code").val();
var li=$(".am-pagination").children();
  for (i = 0; i < li.length; i++) {
        
        var url=li.eq(i).attr('href');
        if(url){
          li.eq(i).attr('href',url+'&&username='+username+'&&limit='+id);
        }       
    }
  
})
$("#code").on('change',function(){
    var username=$("#username").val();
    var id = $(this).find('option:selected').val();
    window.location.href="/admin/member/swus_list?username="+username+"&&limit="+id;
  })
</script>
{/block}
 
